Resumen
Utilizamos estos exchanges para analizar el laboratorio 4 exa = [bitmart, gateio, bitget] y utilizamos los siguentes pares BTC/USDT,BNB/USDT,DODGE/USDT para realizar el estudio de las microestructuras de mercados
import data as dt
import functions as fun
import plotly.express as px
dt.df.head(4)
| Ticker | Exchange | TimeStamp | Level | Bid | Ask | Spread | Bid_Volume | Ask_Volume | Total_volume | Mid_price | VWAP | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | BNB/USDT | BitMart | 2022-11-14 06:12 | 30 | 268.36 | 268.54 | 0.18 | 0.59 | 0.15 | 0.74 | 268.450 | 268.450000 |
| 1 | BNB/USDT | BitMart | 2022-11-14 06:12 | 30 | 268.35 | 268.56 | 0.21 | 0.61 | 0.55 | 1.16 | 268.455 | 268.453053 |
| 2 | BNB/USDT | BitMart | 2022-11-14 06:12 | 30 | 268.33 | 268.57 | 0.24 | 0.35 | 0.38 | 0.73 | 268.450 | 268.452205 |
| 3 | BNB/USDT | BitMart | 2022-11-14 06:12 | 30 | 268.31 | 268.58 | 0.27 | 0.64 | 0.38 | 1.02 | 268.445 | 268.450192 |
spread_data = dt.spread_data
spread_data.tail(4)
| Ticker | Exchange | TimeStamp | Spread | close | Level | Bid | Ask | Bid_Volume | Ask_Volume | Total_volume | Mid_price | VWAP | open | high | low | Volume | Effective Spread | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 11756 | BNB/USDT | Gate.io | 2022-11-14 07:12 | 3.86 | 277.35 | 30.0 | 275.75 | 279.61 | 0.0050 | 0.815100 | 0.820100 | 277.680 | 0.377425 | 277.35 | 277.49 | 277.43 | 2.1634 | 0.0 |
| 11757 | BNB/USDT | Gate.io | 2022-11-14 07:12 | 3.90 | 277.35 | 30.0 | 275.73 | 279.63 | 4.3271 | 1.258900 | 5.586000 | 277.680 | 0.377426 | 277.35 | 277.49 | 277.43 | 2.1634 | 0.0 |
| 11758 | BNB/USDT | Gate.io | 2022-11-14 07:12 | 4.11 | 277.35 | 30.0 | 275.59 | 279.70 | 1.4400 | 0.892700 | 2.332700 | 277.645 | 0.377427 | 277.35 | 277.49 | 277.43 | 2.1634 | 0.0 |
| 11759 | BNB/USDT | Gate.io | 2022-11-14 07:12 | 4.21 | 277.35 | 30.0 | 275.50 | 279.71 | 0.0065 | 0.019261 | 0.025761 | 277.605 | 0.377427 | 277.35 | 277.49 | 277.43 | 2.1634 | 0.0 |
fig=px.line(spread_data[spread_data.Ticker == 'BNB/USDT'], x='TimeStamp', y='Level', color="Exchange",title='Levels')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BTC/USDT'], x='TimeStamp', y='Level', color="Exchange",title='Levels')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'DODGE/USDT'], x='TimeStamp', y='Level', color="Exchange",title='Levels')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BNB/USDT'], x='TimeStamp', y='Bid_Volume', color="Exchange",title='Bid Volume')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BTC/USDT'], x='TimeStamp', y='Bid_Volume', color="Exchange",title='Bid Volume')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'DODGE/USDT'], x='TimeStamp',y='Bid_Volume', color="Exchange",title='Bid Volume')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BNB/USDT'], x='TimeStamp',y='Ask_Volume', color="Exchange",title='Ask Volume')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BTC/USDT'], x='TimeStamp',y='Ask_Volume', color="Exchange",title='Ask Volume')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'DODGE/USDT'], x='TimeStamp',y='Ask_Volume', color="Exchange",title='Ask Volume')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BNB/USDT'], x='TimeStamp',y= 'Total_volume', color="Exchange",title='Total volume')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BTC/USDT'], x='TimeStamp',y= 'Total_volume', color="Exchange",title='Total volume')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'DODGE/USDT'], x='TimeStamp',y= 'Total_volume', color="Exchange",title='Total volume')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BNB/USDT'], x='TimeStamp',y= 'Mid_price', color="Exchange",title=' Mid Price ')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BTC/USDT'], x='TimeStamp',y= 'Mid_price', color="Exchange",title=' Mid Price ')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'DODGE/USDT'], x='TimeStamp',y= 'Mid_price', color="Exchange",title=' Mid Price ')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BNB/USDT'], x='TimeStamp',y= 'VWAP', color="Exchange",title=' VWAP ')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'BTC/USDT'], x='TimeStamp',y= 'VWAP', color="Exchange",title=' VWAP ')
fig.show()
fig=px.line(spread_data[spread_data.Ticker == 'DODGE/USDT'], x='TimeStamp',y= 'VWAP', color="Exchange",title=' VWAP ')
fig.show()